#include "settings.h"
#include "defines.h"
using namespace std;

settings::settings() {
  chanceFood = CHANCE_FOOD;
  evolutionAmount = 20;
  evolutionChance = 8;
  evolve = true;
  fightDamage = FIGHT_DAMAGE;
  foodInterval = FOOD_ITERATIONS;
  foodHealth = FOOD_INCREASE;
  initBotChance = CHANCE_NEWBOT;
  initBotHealth = START_HEALTH;
  mutate = true;
  mutateChance = 10;
  quality = wxIMAGE_QUALITY_NORMAL;
  useLog = true;
}

settings::~settings() {

}

void settings::AddToLog(wxString newText) {
  if(useLog) {
    (*log) << newText << _("\n");
  }
  while(log->GetNumberOfLines() > 100) {
    // remove the first line
    log->Remove(0, log->GetLineLength(0) + 1);
  }
  log->ShowPosition(log->GetLastPosition());
}
